﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using DAL.Tests;
using Model;
using DAL;

namespace DBUpdater
{
    public class Program
    {
        static void Main(string[] args)
        {
            /*
            for (int cnt = 0; cnt < Enum.GetValues(typeof(HouseTypeName)).Length; cnt++ )
            {
                string sql = string.Format("insert into HouseType values({0},N'{1}');",
                    cnt, Enum.GetValues(typeof(HouseTypeName)).GetValue(cnt).ToString());
                DAL.DBHelper.ExecuteCommand(sql);
            }
            for (int cnt = 0; cnt < Enum.GetValues(typeof(LeaseModeName)).Length; cnt++)
            {
                string sql = string.Format("insert into LeaseMode values({0},N'{1}');",
                    cnt, Enum.GetValues(typeof(LeaseModeName)).GetValue(cnt).ToString());
                DAL.DBHelper.ExecuteCommand(sql);
            }
            for (int cnt = 0; cnt < Enum.GetValues(typeof(StatusCodeName)).Length; cnt++)
            {
                string sql = string.Format("insert into StatusCode values({0},N'{1}');",
                    cnt, Enum.GetValues(typeof(StatusCodeName)).GetValue(cnt).ToString());
                DAL.DBHelper.ExecuteCommand(sql);
            }
             */
            for (int cnt = 0; cnt < Enum.GetValues(typeof(AreaName)).Length; cnt++)
            {
                string sql = string.Format("insert into Area values({0}, N'{1}');",
                    cnt, ((AreaName)cnt).ToString());
                DAL.DBHelper.ExecuteCommand(sql);
            }
            //Console.WriteLine(DateTime.Now.Ticks);
            //Console.ReadKey();
        }
        
       
    }
}
